function handleFileImg() {
	$(".sel_image").change(function() {
		var target = $(this);
		var file_model = $(this).attr('file_model');
		var file = target.context.files[0];
		var formdata = new FormData();
		formdata.append('file', file);
		$.ajax({
			url : ctx + 'uploadImage/' + file_model,
			type : 'POST',
			data : formdata,
			async : false,
			cache : false,
			contentType : false,
			processData : false,
			dataType : "JSON",
			success : function(result) {
				if (result.code == 0) {
					target.next().val(result.msg);
					target.prev().attr('src', result.msg)
				} else {
					layer.msg(result.msg, {
						icon : 2,
						time : 2000,
						shade : [ 0.1, "#8F8F8F" ]
					});
				}
			}
		});

	});

	//上传多张图片
	$(".sel_image3").change(function() {
		var target = $(this);
		var file_model3 = $(this).attr('file_model3');
		var length = target.context.files.length;
		var formdata = new FormData();
		for(var j=0;j<length;j++){
			/*var file[j] = target.context.files[j];*/
			formdata.append('file'+[j],target.context.files[j]);
		}
		$.ajax({
			url : ctx + 'moreUploadImage/' + file_model3,
			type : 'POST',
			data : formdata,
			async : false,
			cache : false,
			contentType : false,
			processData : false,
			dataType : "JSON",
			success : function(result) {
				if (result.code == 0) {
					target.next().val(result.msg);
					var json = JSON.parse(result.msg);
					for(var i=0;i<json.length;i++){
						//动态添加html元素
						$("#dd").append("<div class='fileCss'><img src="+json[i]+" name='image0'> <i class='iconfont icon-shanchu'></i></div>");
					}
				} else {
					layer.msg(result.msg, {
						icon : 2,
						time : 2000,
						shade : [ 0.1, "#8F8F8F" ]
					});
				}
			}
		});

	});
	$("body").on("click",".icon-shanchu",function(){
		$(this).parent().remove();
	})

}
